

class Range {

	private:
		float a;
		float b;
		int lock;

	public:
		Range(){}
		
		Range(float a, float b) {
			this->lock = 0;
			this->a = a;
			this->b = b;
			if(b<a){
				float c=a;
				a=b;
				b=c;
			}
		}

		bool rangeCheck(float x){
			if(x<a || x>b){
				return false;
			}
			return true;
		}
	
		float getA() {
			return a;
		}

		bool setA(float a) {
			if(lock==0 && a<=this->b){
				this->a = a;
				return true;
			}
			return false;
		}

		float getB() {
			return b;
		}

		bool setB(float b) {
			if(lock==0 && this->a<=b){
				this->b = b;
				return true;
			}
			return false;
		}
		void lockDown(){
			lock--;
		}
		void lockUp(){
			lock++;
		}
	};
